package com.yanh.transaction.service;

import com.yanh.common.exception.BusinessException;
import com.yanh.transaction.domain.PayChannel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yanh.transaction.dto.PayChannelParamDTO;
import com.yanh.transaction.dto.PayOrderDTO;
import com.yanh.transaction.dto.QRCodeDto;
import com.yanh.transaction.dto.agent.PaymentResponseDTO;
import com.yanh.transaction.vo.PlatformChannelVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yanh
 * @since 2024-06-02
 */
public interface IPayChannelService extends IService<PayChannel> {
    List<PlatformChannelVo> queryPlatformChannel() throws BusinessException;
    boolean bindPlatformChannelForApp(String appId, String platformChannelCodes) throws BusinessException;
    boolean queryAppBindPlatformChannel(String appId, String platformChannel) throws BusinessException;
    void savePayChannelParam(PayChannelParamDTO payChannelParam) throws BusinessException;

    List<PayChannelParamDTO> queryPayChannelParamByAppAndPlatform(String appId, String platformChannel);

    PayChannelParamDTO queryParamByAppPlatformAndPayChannel(String appId, String platformChannel, String payChannel);

    PaymentResponseDTO submitOrderByAli(PayOrderDTO payOrderDTO) throws BusinessException;

    Map<String, String> submitOrderByWechat(PayOrderDTO payOrderDTO) throws BusinessException;
}
